import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);
const routes = [{
        path: '/',
        redirect: '/layout',
    },
    {
        name: 'Layout',
        path: '/layout',
        redirect: '/layout/home',
        component: () => import("@/views/Layout"), //路由懒加载 
        children: [{
                name: 'Home',
                path: 'home',
                meta: {
                    name: '首页'
                },
                component: () => import('@/views/Home'), //路由懒加载
            },
            {
                name: 'Search',
                path: 'search',
                meta: {
                    name: '搜索'
                },
                component: () => import('@/views/Search'), //路由懒加载
            },
            {
                name: 'Person',
                path: 'person',
                meta: {
                    name: '个人'
                },
                component: () => import('@/views/Person')
            },
            {
                name: 'SongList',
                path: 'songList',
                meta: {
                    name: '榜单'
                },
                component: () => import('@/views/SongList')
            },
        ]
    },
    {
        name: 'Play',
        path: '/play',
        meta: {
            name: '播放',
        },
        component: () => import('@/views/Play')
    },
    {
        name: 'MoreSong',
        path: '/moresong',
        meta: {
            name:'更多歌曲',
        },
        component:()=>import('@/views/MoreSong')
    },
    {
        name: 'RecomdDetail',
        path: '/recomdDetail',
        meta: {
            name: '推荐歌单',
        },
        component: () => import('@/views/recomdDetail'),
    },
    {
        name: 'GoDownLoad',
        path: '/goDodownLoad',
        meta: {
            name:'下载',
        },
        component:()=>import('@/views/GoDownLoad')
    },
    {
        name: 'GoLogin',
        path: '/goLogin',
        meta: {
            name:'登录'
        },
        component:()=>import('@/views/GoLogin')
    },
    {
        name: 'FullyList',
        path: '/fullyList',
        meta: {
            name:'完整榜单'
        },
        component: () => import('@/views/FullyList')
    }
]
const router = new VueRouter({
    routes,
})
export default router;